/**
 * @file budgetproject 接口实现
 * @author eabax-FE
 */
import request from '@/utils/request'
const prefix = '/cecapitalexpend' // 这里需要修改为微服务网关的前缀

/**
 * @name 增加
 * @description 增加
 * @param body  budgetproject
 * @return
 */
export function addFn(budgetproject) {
  return request({
    url: `${prefix}/budgetproject/add`,
    method: 'post',
    data: budgetproject
  })
}
/**
 * @name 删除
 * @description 删除
 * @param path integer id
 * @param path integer lngparentid
 * @return
 */
export function deleteFn(id, lngparentid) {
  return request({
    url: `${prefix}/budgetproject/delete/${id}/${lngparentid}`,
    method: 'delete'
  })
}
/**
 * @name 标准职称取得(返回树状)
 * @description 标准职称取得(返回树状)
 * @param body  budgetproject
 * @return
 */
export function getBudgetprojectTreeFn(budgetproject) {
  return request({
    url: `${prefix}/budgetproject/getBudgetprojectTree`,
    method: 'post',
    data: budgetproject
  })
}
/**
 * @name 预算项目是否被使用
 * @description 预算项目是否被使用
 * @param path integer lngbudgetprojectid
 * @return
 */
export function isUsedFn(lngbudgetprojectid) {
  return request({
    url: `${prefix}/budgetproject/isUsed/${lngbudgetprojectid}`,
    method: 'get'
  })
}
/**
 * @name 根据条件查询
 * @description 根据条件查询
 * @param body  budgetproject
 * @return
 */
export function findSearchFn(budgetproject) {
  return request({
    url: `${prefix}/budgetproject/search`,
    method: 'post',
    data: budgetproject
  })
}
/**
 * @name 分页+多条件查询
 * @description 分页+多条件查询
 * @param body  budgetproject
 * @param path integer page
 * @param path integer size
 * @return
 */
export function findSearchPageFn(budgetproject, page, size) {
  return request({
    url: `${prefix}/budgetproject/search/${page}/${size}`,
    method: 'post',
    data: budgetproject
  })
}
/**
 * @name 修改
 * @description 修改
 * @param body  budgetproject
 * @param path integer id
 * @return
 */
export function updateFn(budgetproject, id) {
  return request({
    url: `${prefix}/budgetproject/update/${id}`,
    method: 'put',
    data: budgetproject
  })
}
/**
 * @name 停启用开关
 * @description 停启用开关
 * @param body  budgetproject
 * @return
 */
export function updateBlnisinactiveFn(budgetproject) {
  return request({
    url: `${prefix}/budgetproject/updateBlnisinactive`,
    method: 'post',
    data: budgetproject
  })
}
/**
 * @name 根据ID查询
 * @description 根据ID查询
 * @param path integer id
 * @return
 */
export function findByIdFn(id) {
  return request({
    url: `${prefix}/budgetproject/findById/${id}`,
    method: 'get'
  })
}
